DROP TABLE IF EXISTS jms_dm.dm_customer_fran_structure_dt ;
create external table jms_dm.dm_customer_fran_structure_dt
(
    timetype        string COMMENT '时间类型,区分日,周,月',
    date_time       string COMMENT '日期',
    agent_code      string COMMENT '代理区code',
    agent_name      string COMMENT '代理区',
    total_fran_num  string COMMENT '加盟商总数',
    head_fran_num   string COMMENT '头部加盟商个数',
    head_fran_ratio double COMMENT '头部加盟商占比',
    tail_fran_num   int COMMENT '尾部加盟商个数',
    tail_fran_ratio double COMMENT '尾部加盟商占比',
    dorisdt         string COMMENT '为doris同步分区使用'
)
    COMMENT '加盟商结构情况'
    PARTITIONED BY ( dt STRING COMMENT '日期')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_customer_fran_structure_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );